import React from "react";
import { useNavigate } from "react-router-dom";
import { useIllnessesData } from "../../hooks/illness";

function illness() {
  const navigate = useNavigate();
  const { banners } = useIllnessesData();
  return (
    <div>
      <p
        onClick={() => {
          navigate(-1);
        }}
        style={{ cursor: "pointer" }}
      >
        &lt;&lt;返回
      </p>
      illness
      <ul>
        {banners.map((item: any) => (
          <li className="doctorLi" key={item.id}>
            <p>药名:{item.name}</p>
            <p>主治：{item.category.name}</p>
            <p>价格：{item.price}</p>
            <img src={item.image} alt="" />
          </li>
        ))}
      </ul>
    </div>
  );
}

export default illness;
